(function(){
	
	Ext.define('AppView.sys.loginUser.LoginUserGridModel',{
		extend:'Ext.data.Model',
		fields: [
			{name:'userName'},
			{name:'password'},
			{name:'createTime'},
			{name:'safeQue'},
			{name:'safeAns'},
			{name:'isUse'}
		]
	});
	
	Ext.define('AppView.sys.loginUser.LoginUserGridStore',{
		extend:'Ext.data.Store',
		autoLoad: true,
		model: 'AppView.sys.loginUser.LoginUserGridModel',
		pageSize:20,
	    proxy: {
	        type: 'ajax',
	        url: '/user/login/queryLoginUserPage.do',
	        reader: {
	            type: 'json',
	            root: 'objectList',
	            totalProperty:'allCount'
	        }
	    }
	});
	
	Ext.define('AppView.sys.loginUser.LoginUserGrid',{
		extend:'AppView.base.BaseGrid',
		alias:'widget.loginusergrid',
		btConfig:{
			add:false,
			edit:false,
			del:true,
			refresh:true
		},
		columns: [
	        { text: '账号',  dataIndex: 'userName' ,flex: 1 },
	        { text: '密码', dataIndex: 'password', flex: 1 },
	        { text: '安全问题', dataIndex: 'safeQue', flex: 1 },
	        { text: '安全答案', dataIndex: 'safeAns', flex: 1 },
	        { text: '创建时间', dataIndex: 'createTime' ,flex: 1, 
				renderer:Renderer.DateRenderer('Y-m-d H:i:s')
	        },
	        { text: '是否启用', dataIndex: 'isUse', flex: 1,renderer:function(value){
	        	if(value==1){
	        		return '是'
	        	}else{
	        		return '否'
	        	}
	        }}
	    ],
	    moduleUrl:'/user/login',
	    gridStore:'AppView.sys.loginUser.LoginUserGridStore',
	    initComponent:function(){
			this.callParent();
	    }
	})
})()

